From julier at ait.nrl.navy.mil Tue Feb 17 18:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue Feb 17 23:27:02 2004 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier@ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 08:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Feb 18 08:38:57 2004 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 20:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Feb 18 20:45:19 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 21:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Feb 18 20:56:29 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 13:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu Feb 19 13:49:50 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 14:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Feb 19 14:03:18 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 22:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu Feb 19 21:24:07 2004 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- package gnu.io; import java.io.*; import java.util.*; public class LibLoader { public LibLoader(String name) throws Exception { loadCommLib(name); } private void loadCommLib (String name) throws Exception { String libName = System.mapLibraryName(name); InputStream is = getClass().getClassLoader().getResourceAsStream(libName); File f = File.createTempFile("lib", ""); f.deleteOnExit(); FileOutputStream fos = new FileOutputStream (f); //System.out.println ("Writing lib to " + f.getAbsolutePath()); byte[] b = new byte[1000]; int len; while ((len = is.read(b)) >= 0) { fos.write(b, 0, len); } fos.close(); System.load(f.getAbsolutePath()); } public static void main(String[] args) throws Exception { LibLoader libLoader1 = new LibLoader("rxtxSerial"); Enumeration enum = CommPortIdentifier.getPortIdentifiers(); while (enum.hasMoreElements()) { System.out.println ("Found port " + ((CommPortIdentifier)enum.nextElement()).getName()); } } } -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 16:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu Feb 19 21:57:56 2004 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 08:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Feb 20 08:29:53 2004 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 10:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Feb 20 15:05:18 2004 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- package gnu.io; import java.io.*; import java.util.*; public class LibLoader { public static void loadCommLib (String name) throws Exception { String libName = System.mapLibraryName(name); InputStream is = new LibLoader().getClass().getClassLoader().getResourceAsStream(libName); File fd = File.createTempFile("lib", ""); String path = fd.getAbsolutePath(); fd.delete(); File f = new File(path); f.deleteOnExit(); f.mkdirs(); f = new File (f, libName); f.deleteOnExit(); FileOutputStream fos = new FileOutputStream (f); //System.out.println ("Writing lib to " + f.getAbsolutePath()); byte[] b = new byte[1000]; int len; while ((len = is.read(b)) >= 0) { fos.write(b, 0, len); } fos.close(); System.load(f.getAbsolutePath()); } public static void main(String[] args) throws Exception { LibLoader.loadCommLib("rxtxSerial"); Enumeration enum = CommPortIdentifier.getPortIdentifiers(); while (enum.hasMoreElements()) { System.out.println ("Found port " + ((CommPortIdentifier)enum.nextElement()).getName()); } } } From taj at www.linux.org.uk Fri Feb 20 15:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 20 15:51:38 2004 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 16:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 20 16:10:05 2004 Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Fri Feb 20 11:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Feb 20 16:10:45 2004 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 17:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Feb 20 16:25:52 2004 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 12:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Feb 20 17:01:55 2004 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 12:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Feb 20 18:04:34 2004 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment.html From taj at www.linux.org.uk Fri Feb 20 18:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 20 18:45:38 2004 Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 15:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Feb 20 21:15:00 2004 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 21:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 20 21:28:09 2004 Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 15:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Feb 20 21:36:13 2004 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment.html From taj at www.linux.org.uk Mon Feb 23 20:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Feb 23 20:50:47 2004 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.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 17:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Feb 24 17:50:36 2004 Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries 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 16:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Feb 27 22:09:12 2004 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment.html From taj at www.linux.org.uk Fri Feb 27 22:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 27 22:27:32 2004 Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would 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 22:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 27 22:32:43 2004 Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big 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 17:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri Feb 27 22:50:33 2004 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not 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 23:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Feb 27 23:07:50 2004 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that 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 Sat Feb 28 12:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat Feb 28 04:16:23 2004 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment.html From taj at www.linux.org.uk Sat Feb 28 16:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat Feb 28 16:07:08 2004 Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to 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 julier at ait.nrl.navy.mil Tue Feb 17 23:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier@ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 08:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 20:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 21:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 13:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 14:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 21:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- package gnu.io; import java.io.*; import java.util.*; public class LibLoader { public LibLoader(String name) throws Exception { loadCommLib(name); } private void loadCommLib (String name) throws Exception { String libName = System.mapLibraryName(name); InputStream is = getClass().getClassLoader().getResourceAsStream(libName); File f = File.createTempFile("lib", ""); f.deleteOnExit(); FileOutputStream fos = new FileOutputStream (f); //System.out.println ("Writing lib to " + f.getAbsolutePath()); byte[] b = new byte[1000]; int len; while ((len = is.read(b)) >= 0) { fos.write(b, 0, len); } fos.close(); System.load(f.getAbsolutePath()); } public static void main(String[] args) throws Exception { LibLoader libLoader1 = new LibLoader("rxtxSerial"); Enumeration enum = CommPortIdentifier.getPortIdentifiers(); while (enum.hasMoreElements()) { System.out.println ("Found port " + ((CommPortIdentifier)enum.nextElement()).getName()); } } } -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 21:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 08:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 09:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- package gnu.io; import java.io.*; import java.util.*; public class LibLoader { public static void loadCommLib (String name) throws Exception { String libName = System.mapLibraryName(name); InputStream is = new LibLoader().getClass().getClassLoader().getResourceAsStream(libName); File fd = File.createTempFile("lib", ""); String path = fd.getAbsolutePath(); fd.delete(); File f = new File(path); f.deleteOnExit(); f.mkdirs(); f = new File (f, libName); f.deleteOnExit(); FileOutputStream fos = new FileOutputStream (f); //System.out.println ("Writing lib to " + f.getAbsolutePath()); byte[] b = new byte[1000]; int len; while ((len = is.read(b)) >= 0) { fos.write(b, 0, len); } fos.close(); System.load(f.getAbsolutePath()); } public static void main(String[] args) throws Exception { LibLoader.loadCommLib("rxtxSerial"); Enumeration enum = CommPortIdentifier.getPortIdentifiers(); while (enum.hasMoreElements()) { System.out.println ("Found port " + ((CommPortIdentifier)enum.nextElement()).getName()); } } } From taj at www.linux.org.uk Fri Feb 20 15:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 16:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Fri Feb 20 16:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 16:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 17:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 18:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:06 2005 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment.htm From taj at www.linux.org.uk Fri Feb 20 18:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 21:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment.htm From taj at www.linux.org.uk Fri Feb 20 21:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 21:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment.htm From taj at www.linux.org.uk Mon Feb 23 20:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.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 17:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries 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 22:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:07 2005 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment.htm From taj at www.linux.org.uk Fri Feb 27 22:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would 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 22:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big 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 22:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not 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 23:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that 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 Sat Feb 28 04:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment.htm From taj at www.linux.org.uk Sat Feb 28 16:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to 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 julier at ait.nrl.navy.mil Tue Feb 17 23:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier@ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 08:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 20:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 21:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 13:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 14:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 21:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- package gnu.io; import java.io.*; import java.util.*; public class LibLoader { public LibLoader(String name) throws Exception { loadCommLib(name); } private void loadCommLib (String name) throws Exception { String libName = System.mapLibraryName(name); InputStream is = getClass().getClassLoader().getResourceAsStream(libName); File f = File.createTempFile("lib", ""); f.deleteOnExit(); FileOutputStream fos = new FileOutputStream (f); //System.out.println ("Writing lib to " + f.getAbsolutePath()); byte[] b = new byte[1000]; int len; while ((len = is.read(b)) >= 0) { fos.write(b, 0, len); } fos.close(); System.load(f.getAbsolutePath()); } public static void main(String[] args) throws Exception { LibLoader libLoader1 = new LibLoader("rxtxSerial"); Enumeration enum = CommPortIdentifier.getPortIdentifiers(); while (enum.hasMoreElements()) { System.out.println ("Found port " + ((CommPortIdentifier)enum.nextElement()).getName()); } } } -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 21:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 08:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:28 2005 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 09:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- package gnu.io; import java.io.*; import java.util.*; public class LibLoader { public static void loadCommLib (String name) throws Exception { String libName = System.mapLibraryName(name); InputStream is = new LibLoader().getClass().getClassLoader().getResourceAsStream(libName); File fd = File.createTempFile("lib", ""); String path = fd.getAbsolutePath(); fd.delete(); File f = new File(path); f.deleteOnExit(); f.mkdirs(); f = new File (f, libName); f.deleteOnExit(); FileOutputStream fos = new FileOutputStream (f); //System.out.println ("Writing lib to " + f.getAbsolutePath()); byte[] b = new byte[1000]; int len; while ((len = is.read(b)) >= 0) { fos.write(b, 0, len); } fos.close(); System.load(f.getAbsolutePath()); } public static void main(String[] args) throws Exception { LibLoader.loadCommLib("rxtxSerial"); Enumeration enum = CommPortIdentifier.getPortIdentifiers(); while (enum.hasMoreElements()) { System.out.println ("Found port " + ((CommPortIdentifier)enum.nextElement()).getName()); } } } From taj at www.linux.org.uk Fri Feb 20 15:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 16:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Fri Feb 20 16:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 16:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 17:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 18:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0001.htm From taj at www.linux.org.uk Fri Feb 20 18:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:29 2005 Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 21:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0001.htm From taj at www.linux.org.uk Fri Feb 20 21:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 21:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0001.htm From taj at www.linux.org.uk Mon Feb 23 20:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.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 17:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries 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 22:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0001.htm From taj at www.linux.org.uk Fri Feb 27 22:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would 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 22:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big 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 22:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not 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 23:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:30 2005 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that 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 Sat Feb 28 04:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0001.htm From taj at www.linux.org.uk Sat Feb 28 16:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0395.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0392.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0395.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0392.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0145.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0395.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0395.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0395.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0395.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0396.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0393.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0396.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0393.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0146.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0396.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0396.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0396.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0396.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0397.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0394.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0397.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0394.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0147.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0397.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0397.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0397.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0397.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0398.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0395.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0398.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0395.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0148.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0398.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0398.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0398.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0398.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0399.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0396.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0399.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0396.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0149.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0399.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0399.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0399.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0399.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0400.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0397.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0400.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0397.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0150.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0400.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0400.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0400.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0400.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0401.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0398.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0401.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0398.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0151.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0401.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0401.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0401.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0401.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0402.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0399.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0402.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0399.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0153.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0402.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0402.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0402.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0402.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0403.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0400.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0403.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0400.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0154.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0403.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0403.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0403.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0403.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0404.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0401.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0404.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0401.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0356.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0404.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0404.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0404.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0404.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0001.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0001.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0001.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0002.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0002.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0002.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0002.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0002.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0003.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0003.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0003.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0003.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0003.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0004.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0004.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0004.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0004.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0004.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0005.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0005.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0005.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0005.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0005.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0006.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0006.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0006.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0006.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0006.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0007.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0007.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0007.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0007.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0007.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0008.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0008.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0008.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0008.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0008.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0009.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0009.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0009.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0009.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0009.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0010.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0010.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0010.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0010.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0010.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0001.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0001.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0001.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0002.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0002.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0002.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0002.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0002.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0003.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0003.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0003.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0003.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0003.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0004.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0004.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0004.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0004.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0004.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0005.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0005.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0005.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0005.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0005.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0006.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0006.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0006.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0006.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0006.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0007.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0007.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0007.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0007.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0007.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0008.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0008.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0008.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0008.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0008.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0009.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0009.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0009.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0009.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0009.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0010.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0010.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0010.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0010.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0010.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0001.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0001.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0001.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0001.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0002.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0002.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0002.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0002.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0002.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO 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: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0003.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0003.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0003.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0003.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0003.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0004.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0004.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0004.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0004.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0004.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0005.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0005.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0005.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0005.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0005.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0006.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0006.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0006.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0006.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0006.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0007.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0007.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0007.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0007.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0007.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0008.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0008.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0008.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0008.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0008.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0009.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0009.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0009.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0009.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0009.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0010.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0010.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0010.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0010.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0010.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0011.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0011.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0011.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0011.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0011.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0011.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0011.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0012.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0012.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0012.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0012.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0012.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0012.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0012.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0013.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0013.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0013.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0013.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0013.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0013.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0013.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0014.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0014.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0014.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0014.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0014.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0014.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0014.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0015.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0015.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0015.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0015.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0015.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0015.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0015.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0016.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0016.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0016.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0016.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0016.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0016.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0016.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0017.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0017.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0017.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0017.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0017.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0017.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0017.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0018.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0018.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0018.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0018.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0018.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0018.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0018.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0019.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0019.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0019.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0019.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0019.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0019.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0019.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0020.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0020.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0020.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0020.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0020.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0020.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0020.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0021.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0021.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0021.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0021.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0021.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0021.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0021.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0022.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0022.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0022.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0022.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0022.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0022.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0022.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0023.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0023.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0023.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0023.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0023.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0023.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0023.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0024.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0024.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0024.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0024.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0024.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0024.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0024.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0025.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0025.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0025.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0025.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0025.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0025.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0025.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0026.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0026.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0026.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0026.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0026.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0026.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0026.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0027.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0027.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0027.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0027.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0027.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0027.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0027.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0028.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0028.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0028.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0028.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0028.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0028.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0028.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0029.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0029.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0029.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0029.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0029.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0029.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0029.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0030.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0030.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0030.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0030.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0030.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0030.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0030.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/RXTXBundle-0031.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/LibLoader-0031.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/RXTXBundle-0031.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/LibLoader-0031.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0031.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0031.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0031.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0032.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0032.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0032.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0001.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0001.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0001.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0033.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0033.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0033.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0002.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0002.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0002.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0034.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0034.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0034.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0003.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0003.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0003.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0035.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0035.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0035.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0004.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0004.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0004.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0036.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0036.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0036.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0005.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0005.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0005.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0037.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0037.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0037.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0006.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0006.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0006.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0038.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0038.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0038.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0007.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0007.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0007.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0039.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0039.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0039.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0008.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0008.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0008.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0040.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0040.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0040.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0009.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0009.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0009.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0041.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0041.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0041.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0010.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0010.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0010.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0042.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0042.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0042.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0011.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0011.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0011.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0011.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0043.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0043.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0043.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0012.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0012.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0012.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0012.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0044.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0044.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0044.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0013.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0013.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0013.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0013.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0045.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0045.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0045.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0014.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0014.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0014.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0014.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0046.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0046.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0046.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0015.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0015.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0015.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0015.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0047.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0047.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0047.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0016.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0016.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0016.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0016.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0048.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0048.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0048.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0017.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0017.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0017.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0017.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0049.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0049.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0049.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0018.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0018.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0018.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0018.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0050.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0050.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0050.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0019.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0019.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0019.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0019.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0051.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0051.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0051.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0020.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0020.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0020.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0020.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0052.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0052.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0052.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0021.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0021.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0021.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0021.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0053.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0053.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0053.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0022.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0022.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0022.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0022.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0054.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0054.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0054.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0023.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0023.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0023.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0023.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0055.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0055.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0055.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0024.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0024.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0024.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0024.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0056.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0056.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0056.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0025.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0025.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0025.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0025.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0057.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0057.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0057.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0026.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0026.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0026.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0026.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0058.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0058.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0058.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0027.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0027.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0027.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0027.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0059.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0059.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0059.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0028.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0028.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0028.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0028.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0060.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0060.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0060.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0029.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0029.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0029.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0029.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0061.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0061.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0061.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0030.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0030.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0030.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0030.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how it > works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native libs > onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Fri Feb 20 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 11:10:47 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: References: Message-ID: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > I checked with Windows this morning and it did not work. Windows need a > valid file name (rxtxSerial.dll) for the library to load. AFAIK any OS need valid file name for the library to load > So now, I create a temp directory and place the valid file name in > there and load the lib. It works. why create temporary directory? why not to put rxtxSerial shared library into the permanent location? Mac OS X has a plenty of good candidates for such locations /Library/Java/Extensions (always exist but could require permissions to access) ~/Library/Java/Extensions (could be missing so should be created if is missing) ~/Library/Application Support/RXTX/lib (should be created) windows has Application Data folder in user's folder for Linux we can create Application Data in the user directory too > With Windows, I still have the problem that the file and temp directory > created do not get deleted after the program exits. With MacOS X this > works. that's because windows didn't free that dll > One other thing I changed in LibLoader ist that I made the method > loadCommLib a static method. > > File f = File.createTempFile("lib", ""); > f.deleteOnExit(); again creating temporary directory and deleting it could be a problem, because shared library could be locked on mac os x behavior could be different for jnilib as bundle and for jnilib as dynamic library > I now attach the complete RXTXBundle.jar with native libs for OS X, > Linux and Windows and the LibLoader source with an example main method. > I know exactly how to build jar file with jnilib inside but what about linux/windows? I guess make file should be changed Dmitry Markman From moritz.gmelin at gmx.de Fri Feb 20 09:25:51 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 17:25:51 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Hi , Am 20.02.2004 um 17:10 schrieb Dmitry Markman: > > On Feb 20, 2004, at 10:51 AM, Trent Jarvi wrote: > >> I checked with Windows this morning and it did not work. Windows need >> a >> valid file name (rxtxSerial.dll) for the library to load. > > AFAIK any OS need valid file name for the library to load > Well, it worked for linux and OS X with Temp-File names. >> So now, I create a temp directory and place the valid file name in >> there and load the lib. It works. > > why create temporary directory? > why not to put rxtxSerial shared library into the permanent location? > > Mac OS X has a plenty of good candidates for such locations > /Library/Java/Extensions (always exist but could require permissions > to access) > ~/Library/Java/Extensions (could be missing so should be created if is > missing) > ~/Library/Application Support/RXTX/lib (should be created) > windows has Application Data folder in user's folder > for Linux we can create Application Data in the user directory too > Well, there's plenty of candidates in OS X, plenty in Windows, plenty in Linux...... Most users will not have write access to all of them, so you would have to check on that. We could try to place the lib in any of the java.library.path components. But the main advantage of the temp-directory is, that you can be sure of the RXTX-Version used for your application ! M. From dmarkman at mac.com Fri Feb 20 10:02:04 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 20 Feb 2004 12:02:04 -0500 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> References: <582F7B5E-63BF-11D8-A9D3-000A95DA5E9C@mac.com> <73122626-63C1-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > in Linux...... > > Most users will not have write access to all of them, so you would > have to check on that. > > that's not true all user's folder based place don't have such a restriction (unless remote user's folder special cases) we work with such technique many months already and don't have any permissions problem (linux, windows and Mac OS X) I'd suggest to replace direct call of loadLibrary in static initializers of CommPortIdentifier (rxtxSerial) I2C (rxtxI2C) LPRPort (rxtxParallel) Raw (rxtxRaw) RS485 (rxtxRS485) RXTXCommDriver (rxtxSerial) to something like that (we can use Moritz LibLoader class) public static boolean loadNativeLibrary(String libName){ boolean libOK = false; try{ System.loadLibrary( libName ); libOK = true; }catch(Throwable t){ } if(!libOK){ libOK = installNativeLibrary(libName); } return libOK; } static boolean installNativeLibrary(String libName){ //here we can provide code for the installation native library //it could be temporary folder or I think it's better permanent folder .... boolean libOK = false; try{ System.load( pathToLibrary ); libOK = true; }catch(Throwable t){ } return libOK; } I'd put native library into the following path (inside of the RXTX.jar) file gnu.io.native.linux.i386.serial.librxtxSerial.so gnu.io.native.linux.i386.i2c. gnu.io.native.linux.i386.lpr. gnu.io.native.linux.i386.raw. gnu.io.native.linux.i386.rs485. gnu.io.native.linux.ppc.serial.librxtxSerial.so gnu.io.native.linux.ppc.i2c. gnu.io.native.linux.ppc.lpr. gnu.io.native.linux.ppc.raw. gnu.io.native.linux.ppc.rs485. gnu.io.native.macosx.serial.librxtxSerial.jnilib gnu.io.native.windows.serial.rxtxSerial.dll gnu.io.native. windows.i2c. gnu.io.native. windows.lpr. gnu.io.native. windows.raw. gnu.io.native. windows.rs485. so we have to provide very simple script to add library to jar file after library building Dmitry Markman From minyal at nortelnetworks.com Fri Feb 20 11:04:39 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 12:04:39 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> hi, i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything seems to have been setup properly. the problem is the driver cannot see higher numbered ports. here's what the Sun's COMM implementation sees on my PC: COM6 COM1 COM2 COM10 COM11 COM12 COM13 COM14 COM15 COM16 COM17 COM18 COM19 COM20 COM3 COM5 COM24 here's what RXTX sees: COM2 COM5 COM6 i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, there's an array that lists only COM1-8. Can anyone confirm if there's a limitation on what COM port numbers are supported by the RXTX version for Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for 98/ME. thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/2077bc2d/attachment-0062.html From taj at www.linux.org.uk Fri Feb 20 11:45:48 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 18:45:48 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D8@zrc2c000.us.nortel.com> Message-ID: On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. everything > seems to have been setup properly. the problem is the driver cannot see > higher numbered ports. > here's what the Sun's COMM implementation sees on my PC: > COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's a > limitation on what COM port numbers are supported by the RXTX version for > Windows? the OS supports 256 COM ports for NT/2000 and 128 COM ports for > 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.tar.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rxtxSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:15:04 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Hi Jarvi, thanks for the quick reply. i installed the dll and jar files and got the following error: Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) do you know what's wrong? thanks LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 12:46 PM To: Java RXTX discussion Subject: Re: [Rxtx] Port number limit on Windows On Fri, 20 Feb 2004, Minya Liang wrote: > hi, > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > everything seems to have been setup properly. the problem is the > driver cannot see higher numbered ports. here's what the Sun's COMM > implementation sees on my PC: COM6 > COM1 > COM2 > COM10 > COM11 > COM12 > COM13 > COM14 > COM15 > COM16 > COM17 > COM18 > COM19 > COM20 > COM3 > COM5 > COM24 > > here's what RXTX sees: > COM2 > COM5 > COM6 > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > there's an array that lists only COM1-8. Can anyone confirm if there's > a limitation on what COM port numbers are supported by the RXTX > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > COM ports for 98/ME. > > thanks, > LMY > This is fixed in rxtx-2.0-7pre1 else if(osName.toLowerCase().indexOf("windows") != -1 ) { String[] temp = new String[259]; for( int i = 1; i <= 256; i++ ) { temp[i - 1] = new String( "COM" + i ); } for( int i = 1; i <= 3; i++ ) { temp[i + 255] = new String( "LPT" + i ); } CandidateDeviceNames=temp; } ... I've cross compiled a version of this library if you would like to test it. There may be something I missed when I cross compiled. I dont have a w32 machine running to test if the library loads at this moment. source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta r.gz binaries: (I just quickly compiled this) ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx txSerial.dll It looks like the build was erroneously trying to use a fuserImp.c file. But if you see a problem while trying to use the library, please let me know. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/aec4a22f/attachment-0062.html From taj at www.linux.org.uk Fri Feb 20 14:28:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 21:28:23 +0000 (GMT) Subject: [Rxtx] Port number limit on Windows In-Reply-To: <870397D7C140C84DB081B88396458DAFB528D9@zrc2c000.us.nortel.com> Message-ID: Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading driver > gnu.io.RXTXCommDriver > javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7pre1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-mingw32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 20 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 20 Feb 2004 15:36:18 -0600 Subject: [Rxtx] Port number limit on Windows Message-ID: <870397D7C140C84DB081B88396458DAFB528DA@zrc2c000.us.nortel.com> works! thanks a lot! LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Friday, February 20, 2004 3:28 PM To: Java RXTX discussion Subject: RE: [Rxtx] Port number limit on Windows Ah it looks like the dll EXPORTS did not get put in properly. If you download the rxtxSerial.dll again, that should be solved. On Fri, 20 Feb 2004, Minya Liang wrote: > Hi Jarvi, > thanks for the quick reply. > i installed the dll and jar files and got the following error: > > Caught java.lang.UnsatisfiedLinkError: nativeGetVersion while loading > driver gnu.io.RXTXCommDriver javax.comm.NoSuchPortException > at > javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105) > > do you know what's wrong? > > thanks > LMY > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Friday, February 20, 2004 12:46 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] Port number limit on Windows > > > On Fri, 20 Feb 2004, Minya Liang wrote: > > > hi, > > i'm trying to use the RXTX(v 2.0.5) implementation for windows. > > everything seems to have been setup properly. the problem is the > > driver cannot see higher numbered ports. here's what the Sun's COMM > > implementation sees on my PC: COM6 > > COM1 > > COM2 > > COM10 > > COM11 > > COM12 > > COM13 > > COM14 > > COM15 > > COM16 > > COM17 > > COM18 > > COM19 > > COM20 > > COM3 > > COM5 > > COM24 > > > > here's what RXTX sees: > > COM2 > > COM5 > > COM6 > > > > i briefly checked the gnu.io.RXTXCommDriver source code, for > > Windows, > > there's an array that lists only COM1-8. Can anyone confirm if there's > > a limitation on what COM port numbers are supported by the RXTX > > version for Windows? the OS supports 256 COM ports for NT/2000 and 128 > > COM ports for 98/ME. > > > > thanks, > > LMY > > > > > This is fixed in rxtx-2.0-7pre1 > > else if(osName.toLowerCase().indexOf("windows") != -1 ) > { > String[] temp = new String[259]; > for( int i = 1; i <= 256; i++ ) > { > temp[i - 1] = new String( "COM" + i ); > } > for( int i = 1; i <= 3; i++ ) > { > temp[i + 255] = new String( "LPT" + i ); > } > CandidateDeviceNames=temp; > } > > ... > > I've cross compiled a version of this library if you would like to > test > it. There may be something I missed when I cross compiled. I dont have > a w32 machine running to test if the library loads at this moment. > > > source: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32//rxtx-2.0-7p > re1.ta > r.gz > > binaries: (I just quickly compiled this) > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/RXTXcomm.jar > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1/buildw32/i386-pc-ming > w32/rx > txSerial.dll > > It looks like the build was erroneously trying to use a fuserImp.c > file. > But if you see a problem while trying to use the library, please let me > know. > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0062.html From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if 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 julier at ait.nrl.navy.mil Tue Feb 17 16:31:05 2004 From: julier at ait.nrl.navy.mil (Simon Julier (Contractor)) Date: Tue, 17 Feb 2004 18:31:05 -0500 Subject: [Rxtx] Cannot see USB serial port under Win2K Message-ID: <5.1.0.14.2.20040217172947.028e6d30@mailhost.ait.nrl.navy.mil> I've just started experimenting with rxtx running under Win2K / linux. Although it seems to run fine when I use it to address the native ports, I've run into problems with it accessing a USB/serial port under Win2K (haven't been able to test linux). Specifically, I wrote a small program to see if I could send data down a MCT U232-P9 USB/serial dongle. I tested it on a Dell M50 Laptop and a Quantum3D Thermite. On the M50, the port provided by the dongle was listed amongst the enumerated ports. However, it did not appear as one of the enumerated ports on the Thermite. The Java COMM API was able to enumerate the port correctly on both machines. Does anybody have any suggestion as to why this might occur? If not, could somebody give me pointers to how the port enumeration code works? I started looking through the pre17 / head source code but I wasn't able to track the logic fully. Many thanks, Simon Julier ----------------------------------------- Simon Julier (ITT Industries) Advanced Information Technology Code 5580 Naval Research Laboratory 4555 Overlook Ave. SW Washington, DC 20375-5337 http://www.ait.nrl.navy.mil julier at ait.nrl.navy.mil Voice No. 202-767-0275 Fax Phone No. 202-767-1122 From ricardo.trindade at emation.pt Wed Feb 18 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 18 Feb 2004 08:42:14 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, What's the status of the next release ? Is development active ? Just asking because there hasn't been a release in a long time. thanks Ricardo From taj at www.linux.org.uk Wed Feb 18 13:50:40 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 20:50:40 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Feb 18 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 18 Feb 2004 21:01:55 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I recompiled with the 'devel' flag as false. That will get rid of the message. You just need to download the RXTXcomm.jar file again and install that. Wed Feb 18 13:58:45 $ md5sum RXTXcomm.jar abd8e9d752f0255c7d16c023929909e4 RXTXcomm.jar 58429 Feb 18 13:58 RXTXcomm.jar ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/build/RXTXcomm.jar Make sure you close all the ports before exiting your program. That should remove the lock files. But the warning is harmless. The lockfile code checks if the lockfile is valid. If not you get that warning. On Wed, 18 Feb 2004, Trent Jarvi wrote: > On Wed, 18 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > What's the status of the next release ? Is development active ? Just asking > > because there hasn't been a release in a long time. > > > > thanks > > Ricardo > > > > Hi Ricardo > > I've got some small changes to RXTX. Mostly these are just minor fixes > for w32 baud rates (14400,28800). There is also some code that should fix > threading issues. But I've only addressed half of the native changes that > need to be done for the threading issues. Basically rxtx needs to avoid > holding pointers to Java Objects/methods. This is important for w32 SMP > machines and freebsd maybe others. I've tried to keep a list of all known > issues on the front page of rxtx.org. > > Currently I'm teaching classes and trying to move to an on-line system so > I'm swamped. If someone has time to do some improvements I'd gladly work > with them. > > I can put what I have together if you are considering doing some > development. The freebsd fixes are fairly big changes. I was hoping to > run that through some test suites when I got time. But I'm willing to > share what I have. I expect regressions with the native code changes. > > We have been making test releases. But I've been avoiding making a major > release. The current releases are: > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz > > These libraries have the 'same' native code. > > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Feb 19 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 19 Feb 2004 13:53:13 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I won't be able to help, I'm already up to my head in work. I would gladly test your releases/prereleases though. In your opinion, what's the best release this far ? pre17 ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 18 de Fevereiro de 2004 20:51 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Wed, 18 Feb 2004, Ricardo Trindade wrote: > Hi, > > What's the status of the next release ? Is development active ? Just asking > because there hasn't been a release in a long time. > > thanks > Ricardo > Hi Ricardo I've got some small changes to RXTX. Mostly these are just minor fixes for w32 baud rates (14400,28800). There is also some code that should fix threading issues. But I've only addressed half of the native changes that need to be done for the threading issues. Basically rxtx needs to avoid holding pointers to Java Objects/methods. This is important for w32 SMP machines and freebsd maybe others. I've tried to keep a list of all known issues on the front page of rxtx.org. Currently I'm teaching classes and trying to move to an on-line system so I'm swamped. If someone has time to do some improvements I'd gladly work with them. I can put what I have together if you are considering doing some development. The freebsd fixes are fairly big changes. I was hoping to run that through some test suites when I got time. But I'm willing to share what I have. I expect regressions with the native code changes. We have been making test releases. But I've been avoiding making a major release. The current releases are: ftp://jarvi.dsl.frii.com/pub/rxtx-2.0-7pre1.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre17.tar.gz These libraries have the 'same' native code. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Thu Feb 19 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 19 Feb 2004 14:08:36 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Thu Feb 19 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 19 Feb 2004 22:03:28 +0100 Subject: [Rxtx] Hopefully useful Message-ID: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 135133 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0031.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040219/92bfa810/attachment-0031.pl -------------- next part -------------- From dmarkman at mac.com Thu Feb 19 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 19 Feb 2004 16:57:47 -0500 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> References: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: it is useful (well at least for me) I'm using that way quite a while for my PDBMolecular viewer and for gl4java installer I have 1 gl4java installer for windows/linux/mac os x (that's just one jar file ~5MB) 2click on that jar file and gl4java installed so I think it could be useful (you see I'm using it for about one year and don't have any problem with that way) in that way we actually don't need separate installer: just provide rxtx.jar file with main method 2click on that and everything will be taken care (on MAC OS X we still need some script to setup uucp group and permission but that's could be done with other jnilib as well) I have to use small jnilib library for rendering molecular surface I have main package org.concord.j3d resources package: org.concord.j3d.utils.resources and jni stuff in org.concord.j3d.utils.resources.jni.linux.i386 libsurf.so org.concord.j3d.utils.resources.jni.winows surf.dll org.concord.j3d.utils.resources.jni.macosx libsurf.jnilib and after that I have some small utility that extract jni lib into the predefined location: static String getLibPath(){ int kDomainLibraryFolder = 0x646c6962;//dlib short kUserDomain = -32763; String path = getMacFolderPath(kUserDomain,kDomainLibraryFolder); if(path == null){ String separator = System.getProperty("file.separator"); path = System.getProperty("user.home")+separator+"Application Data"; File uf = new File(path); if(!uf.exists()) uf.mkdirs(); }else{ File testParentFolder = new File(path); File testJavaExtFolder = new File(testParentFolder,"Java/Extensions"); if(!testJavaExtFolder.exists()){ testJavaExtFolder.mkdirs(); } path += "/Java/Extensions"; } return path; } public static String getMacFolderPath(short domain,int folderKind){ try{//MAC OS X 1.4.1 Class clazz = Class.forName("com.apple.eio.FileManager"); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,int.class}); return (String)m.invoke(null,new Object []{new Short(domain),new Integer(folderKind)}); }catch(Throwable t){} try{//MAC OS X 1.3.1 Class clazz = Class.forName("com.apple.mrj.MRJFileUtils"); Class macOsTypeClazz = Class.forName("com.apple.mrj.MRJOSType"); java.lang.reflect.Constructor c = macOsTypeClazz.getConstructor(new Class[]{int.class}); Object macOsType = c.newInstance(new Object []{new Integer(folderKind)}); java.lang.reflect.Method m = clazz.getMethod("findFolder",new Class[]{short.class,macOsTypeClazz}); return ((java.io.File)m.invoke(null,new Object []{new Short(domain),macOsType})).getCanonicalPath(); }catch(Throwable t){} return null; } On Feb 19, 2004, at 4:03 PM, Moritz Gmelin wrote: > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with the code to demonstrate how > it works. I had to remove all occurences of System.loadLibrary > ("rxtxSerial") of course. > That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and > rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on > hand without worriing of the correct version and copying of native > libs onto the system. > Included is that LibLoader class and a RXTXBundle.jar file, that > contains RXTXcomm.jar and the native stuff for linux and MacOS X > (sorry, couldn't get MinGW to work in VirtualPC). > I used rxtx-2.1-7pre17 to build. > > Hope anyone can make use of this. > > Greetings Moritz > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > Dmitry Markman From ricardo.trindade at emation.pt Fri Feb 20 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 20 Feb 2004 08:28:00 -0000 Subject: [Rxtx] Hopefully useful In-Reply-To: <10A83A48-631F-11D8-A783-000A95BC7E8A@gmx.de> Message-ID: Hi, I think it's very usefull! I tried it once and came to the same conclusion that you, the System.loadLibrary calls inside RXTX had to go. I didn't follow from there, since I didn't want to maintain my own build, but sent my results to Trent so he could change RXTX, but few releases have happened since. Trent, does this change make sense in RXTX ? I would be a lot easier to install and distribute RXTX, especially with other apps, since the installation of the lib in the JDK would be gone. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Moritz Gmelin Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 Para: Java RXTX discussion Assunto: [Rxtx] Hopefully useful Hi List Members, I just spent a day figuring out how to make an application distributable in a JAR-Archive that uses native libs (like RXTX requires). Well, all one needs to do is to write the native lib into some file an do a System.load (PATHNAME) on that file to be able to use the native methods in that library. I included a class gnu.io.LibLoader with the code to demonstrate how it works. I had to remove all occurences of System.loadLibrary ("rxtxSerial") of course. That way, you can just add librxtxSerial.so, librxtxSerial.jnilib and rxtxSerial.dll to your RXTXcomm.jar and have all the stuff you need on hand without worriing of the correct version and copying of native libs onto the system. Included is that LibLoader class and a RXTXBundle.jar file, that contains RXTXcomm.jar and the native stuff for linux and MacOS X (sorry, couldn't get MinGW to work in VirtualPC). I used rxtx-2.1-7pre17 to build. Hope anyone can make use of this. Greetings Moritz From moritz.gmelin at gmx.de Fri Feb 20 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 20 Feb 2004 10:45:22 +0100 Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: <809DEB7C-6389-11D8-A783-000A95BC7E8A@gmx.de> Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. Greetings Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: RXTXBundle.jar Type: application/octet-stream Size: 159469 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0031.obj -------------- next part -------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LibLoader.java Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040220/f9ad962d/attachment-0031.pl From taj at www.linux.org.uk Fri Feb 20 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 15:51:50 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle Message-ID: Moritz has another set of attachments which are too large for the mail-list it appears. I'll give the mail-list some time. If they dont go through I'll place them on the ftp server. Here is the message. Date: Fri, 20 Feb 2004 10:38:47 +0100 From: Moritz Gmelin To: Java RXTX discussion Subject: Windows Problem with RXTXBundle Hi again, I checked with Windows this morning and it did not work. Windows need a valid file name (rxtxSerial.dll) for the library to load. So now, I create a temp directory and place the valid file name in there and load the lib. It works. With Windows, I still have the problem that the file and temp directory created do not get deleted after the program exits. With MacOS X this works. One other thing I changed in LibLoader ist that I made the method loadCommLib a static method. I now attach the complete RXTXBundle.jar with native libs for OS X, Linux and Windows and the LibLoader source with an example main method. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 20 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 20 Feb 2004 16:10:16 +0000 (GMT) Subject: [Rxtx] Hopefully useful In-Reply-To: Message-ID: On Fri, 20 Feb 2004, Ricardo Trindade wrote: > Hi, > > I think it's very usefull! > > I tried it once and came to the same conclusion that you, the > System.loadLibrary calls inside RXTX had to go. > > I didn't follow from there, since I didn't want to maintain my own build, > but sent my results to Trent so he could change RXTX, but few releases have > happened since. > > Trent, does this change make sense in RXTX ? I would be a lot easier to > install and distribute RXTX, especially with other apps, since the > installation of the lib in the JDK would be gone. > This sounds good. The changes should be transparent. There are some builds that I think few if any here can make to include the native libraries in the jars. Some native libraries that I've not built: unixware, openunix, hpux, sparc-linux, arm-linux, wince, ... So we seed to make sure there is a way for people using them to add their native libraries. I would be in favor of going this direction though. I'm not sure about sending these changes to the list. They are exceeding the mail-list settings for attachment size and many are just interested in seeing the end result. Some may be bouncing with virus filters too :) If those interested in working on this or sharing larger files contact me off the list I can set up a public ftp directory that can be used to share the files and referenced here or we could do this via CVS access. I will have a chance to read the changes in detail Sunday evening and comment but the suggestion sounds very reasonable. > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Moritz Gmelin > Enviada: quinta-feira, 19 de Fevereiro de 2004 21:03 > Para: Java RXTX discussion > Assunto: [Rxtx] Hopefully useful > > > Hi List Members, > > I just spent a day figuring out how to make an application > distributable in a JAR-Archive that uses native libs (like RXTX > requires). > Well, all one needs to do is to write the native lib into some file an > do a System.load (PATHNAME) on that file to be able to use the native > methods in that library. > I included a class gnu.io.LibLoader with th